<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>prevent</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <style>
        .outer{
            width: 500px;
            height: 500px;
            background-color: red;
        }
      
    </style>
</head>
<body>
    <div id="app">
        <div class="outer" v-on:contextmenu.prevent="outerClick">
           
        </div>
    </div>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                counter:0,
            },
            methods:{
                outerClick(e){
                    // e.preventDefault();
                    console.log("我是外部的div");
                },
              

            }

        });
    </script>
</body>
</html>